package golang

import "fmt"

func main() {
	b := getSequence()
	fmt.Println(b())
	fmt.Println(b())
}

func getSequence() func() int {
	i := 0
	return func() int {
		i++
		fmt.Println(&i)
		return i
	}
}
